-
Notifications
You must be signed in to change notification settings - Fork 959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy electricityMap static assets to GCS #2869
Conversation
outputs: | ||
- public/dist/zonegeometries.json | ||
- src/world.json | ||
- public/dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brick now also builds the frontend
@@ -1,5 +1,5 @@ | |||
FROM node:12.13.1 | |||
WORKDIR /home/web | |||
WORKDIR /home/src/electricitymap/contrib/web |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in order to keep consistent with brick paths
// Note: `resolvePath` is executed on the client as well, | ||
// as it is used in react components. We can't therefore include any variables | ||
// in its closure. It would be better to pass a `pathPrefix` instead. | ||
resolvePath: (!isProduction || isStaging) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the important non-lint change to make sure we use GCS in production
@@ -224,7 +222,13 @@ app.use('/', (req, res) => { | |||
} | |||
}); | |||
|
|||
if (isProduction) { | |||
app.get('/*', (req, res) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
legacy redirect (but shouldn't be necessary)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 💪
* Deploy electricityMap static assets to GCS * update dockerfile paths * Revert * Fix dockerfile * Add config * update container path * No need to clean dir * rename env
Internal PR to simplify deployment on our side:
Blocked by electricitymaps/brick#74